﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;

/* Generated with http://xmltocs.com/ */
namespace EDMXParserV1
{
    public class Runtime
    {
        public StorageModels StorageModels { get; set; }
        public ConceptualModels ConceptualModels { get; set; }
        public Mappings Mappings { get; set; }

        public static Runtime New(System.Xml.XmlNode Node)
        {
            Runtime Runtime = new Runtime();
            foreach (XmlAttribute Attribute in Node.Attributes)
            {
                switch (Attribute.Name)
                {
                    default:
                        Globals.AttributeSwitchCoder(Attribute);
                        break;
                }
            }

            foreach (XmlNode ChildNode in Node.ChildNodes)
            {
                switch (ChildNode.Name)
                {
                    case "#comment":
                        // do nothing
                        break;
                    case "edmx:StorageModels":
                        Runtime.StorageModels = StorageModels.New(ChildNode);

                        break;
                    case "edmx:ConceptualModels":
                        Runtime.ConceptualModels = ConceptualModels.New(ChildNode);
                        break;
                    case "edmx:Mappings":
                        Runtime.Mappings = Mappings.New(ChildNode);

                        break;
                    default:
                        Globals.NodeSwitchCoder(ChildNode);
                        break;
                }
            }

            return Runtime;
        }
    }
}
